﻿<!DOCTYPE html>
<!--作业许可证管理=>作业许可证申请=>受影响相关方添加页 -->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>


</head>

<body>


    <div id="app" v-cloak class="popupW100">
        <el-form label-position="right" :model="Form" status-icon :rules="rules" ref="ruleForm" label-width="140px"
            size="mini">

            <div style="width:100%;text-align:center ">
                <label style="font-weight:bold">作业取消处理</label>
            </div>
            <el-row>
                <el-col :sqpn="11">
                    {{JobPermitCancellation.JobTicketNumber+mark.m}} {{Form.JobTicketNumber}}
                </el-col>
                <br>
                <br>
                <el-col :sqpn="11">
                    {{JobPermitCancellation.JobTicketInfo+mark.m}} <el-button type="text">点击展示票证详细</el-button>
                </el-col>
                <br>
                <br>
                <el-col :span="24">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <div class="el-input--mini el-input-group">
                                <div class="el-input-group__prepend">
                                    {{JobPermitCancellation.ReasonCancellation+mark.m}}
                                </div>
                                <el-input class="el-textarea__inner" type="textarea" v-model="Form.ReasonCancellation"
                                    autocomplete="off"></el-input>
                            </div>
                        </el-form-item>
                    </div>
                </el-col>
                <el-col :sqpn="11">
                    <el-form-item :label="JobPermitCancellation.IsAgree+mark.m" prop="IsAgree">
                        <el-radio-group v-model="Form.IsAgree" style="margin-top:5px">
                            <el-radio v-for="item in IsAgree" :label="item.value" :value="item.key">{{item.value}}
                            </el-radio>
                        </el-radio-group>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row type="flex" justify="center">
                <el-form-item>
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnSave}}</el-button>
                    <!--<el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnCommit}}</el-button>-->
                    <el-button type="primary" @click="onBack">{{col.btnBack}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
    </div>
    <script type="text/javascript">

        var app = new Vue({
            el: '#app',
            data: {
                id: '',
                //业务表单内容
                Form: {
                    id: guidEmpty,
                    JobTicketNumber: '',
                    ReasonCancellation: '',
                    IsAgree: ''
                },
                IsAgree: [],
                ListItem: ListItem,
                //表单验证
                rules: {

                }
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                handleChange: function (value) {
                    console.log(value);
                },
                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    this.$refs[formName].validate(function (valid) {
                        //验证通过
                        if (valid) {
                            onSubmitForm(this, '/api/JobPermitCancellation/Save', mythis.Form);
                        } else {
                            //验证失败
                            return false;
                        }
                    });
                },
                getData: function () {
                    getData(this, '/api/JobPermitCancellation/get?id=' + this.id);
                },

                onBack: function () {
                    parent.app.ListItem.dialogVisible = false;
                }
            },
            mounted: function () {
                this.IsAgree = getDicData('50');
                this.id = getUrlParam("id");
                this.getData();
            }
        });
    </script>
</body>

</html>